Artificial neural network

ABSTRACT

There is provided an apparatus comprising at least one processing core, at least one memory including computer program code, at least one memory and the computer program code being configured to, with at least one processing core, cause the apparatus at least to obtain, from a first sequential input ( 102 ), a first output from a first recurrent neural network, the first sequential input being of a first modality, obtain, from a second sequential input ( 103 ), a second output from a second recurrent neural network, the second sequential input being of a second modality, and process the first output and the second output to obtain a correlation of the first and second sequential inputs.

FIELD

The present invention relates to artificial neural networks and deriving correlations between input sequences.

BACKGROUND

Artificial neural networks may be configured in different ways. In general, an artificial neural network, which will be referred to herein as simply a neural network, comprises artificial neurons, which likewise will be referred to herein simply as neurons. The neurons may be configured to receive inputs, apply weights and provide outputs based on the inputs and the weights, for example. The neurons may be implemented in software, or, additionally or alternatively, a neural network may comprise hardware-based artificial neurons.

Neural networks may be classified into different types based on their properties and configuration. A feedforward neural network is one where connections between neurons do not form cycles, that is, where data flows unidirectionally. An example of a feedforward type neural network is a convolutional neural network, CNN, where a filter is used to apply a convolutional operation to data in a preceding layer, to obtain data for a subsequent layer. CNNs may comprise fully connected layers, where each neuron is connected with each neuron in a preceding layer. CNNs have been employed in image classification, for example. CNNs have achieved, in limited settings, classification performance levels that are comparable to humans.

Recurrent neural networks, RNN, on the other hand, are networks where connections between neurons form a directed cycle. These networks enable processing of sequential data due to their internal memory, and RNNs may operate on the linear progression of time, combining a previous time step and a hidden representation into the representation for the current time step. RNNs have been employed in speech recognition and connected, unsegmented handwriting recognition, for example.

Recursive neural networks apply a set of weights recursively over a structure, to produce structured prediction with respect to input structures which may have varying sizes. Recurrent neural networks are one form of recursive neural networks.

SUMMARY OF THE INVENTION

The invention is defined by the features of the independent claims. Some specific embodiments are defined in the dependent claims.

According to a first aspect of the present invention, there is provided an apparatus comprising at least one processing core, at least one memory including computer program code, the at least one memory and the computer program code being configured to, with the at least one processing core, cause the apparatus at least to obtain, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality, obtain, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality, and process the first output and the second output to obtain a correlation of the first and second sequential inputs.

Various embodiments of the first aspect may comprise at least one feature from the following bulleted list:

-   -   the first recurrent neural network and the second recurrent         neural network each comprise plural long short term memory,         LSTM, blocks     -   the first recurrent neural network comprises a first number of         long short term memory, LSTM, blocks and the second recurrent         neural network comprises a second number of LSTM blocks, the         first number and the second number being unequal     -   the at least one memory and the computer program code are         configured to, with the at least one processing core, cause the         apparatus to process the first output and the second output by         rendering the first output and the second output to have equal         dimensions prior to obtaining an inner product to obtain the         correlation     -   the at least one memory and the computer program code are         configured to, with the at least one processing core, cause the         apparatus to render the outputs to have equal dimensions by         employing a linear transformation     -   the first modality and the second modality are different from         each other     -   the first modality is selected from the following list: video,         textual sentence, speech, handwritten text, stereo video, image         sequence, aircraft control states and aircraft system outputs     -   the second modality is selected from the following list: video,         textual sentence, speech, handwritten text, stereo video, image         sequence, aircraft control states and aircraft system outputs     -   sequential input comprises an input comprising a sequence of         input elements.

According to a second aspect of the present invention, there is provided a method, comprising obtaining, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality, obtaining, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality, and processing the first output and the second output to obtain a correlation of the first and second sequential inputs.

Various embodiments of the second aspect may comprise at least one feature from the following bulleted list:

-   -   the first recurrent neural network and the second recurrent         neural network each comprise plural long short term memory,         LSTM, blocks     -   the first recurrent neural network comprises a first number of         long short term memory, LSTM, blocs and the second recurrent         neural network comprises a second number of LSTM blocks, the         first number and the second number being unequal     -   the first output and the second output are processed by         rendering the first output and the second output to have equal         dimensions prior to obtaining an inner product to obtain the         correlation     -   the outputs are rendered to have equal dimensions by employing a         linear transformation.     -   the first modality and the second modality are different from         each other     -   the first modality is selected from the following list: video,         textual sentence, speech, handwritten text, stereo video, image         sequence and traffic pattern     -   the second modality is selected from the following list: video,         textual sentence, speech, handwritten text, stereo video, image         sequence and traffic pattern     -   sequential input comprises an input comprising a sequence of         input elements.

According to a third aspect of the present invention, there is provided an apparatus comprising means for obtaining, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality, means for obtaining, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality, and means for processing the first output and the second output to obtain a correlation of the first and second sequential inputs.

According to a fourth aspect of the present invention, there is provided a non-transitory computer readable medium having stored thereon a set of computer readable instructions that, when executed by at least one processor, cause an apparatus to at least obtain, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality, obtain, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality, and process the first output and the second output to obtain a correlation of the first and second sequential inputs.

According to a fifth aspect of the present invention, there is provided a computer program configured to cause a method in accordance with the second aspect to be performed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates sequential inputs usable with at least some embodiments of the present invention;

FIG. 2A illustrates an LSTM block;

FIG. 2B illustrates an example system in accordance with at least some embodiments of the present invention;

FIG. 3 illustrates an example apparatus capable of supporting at least some embodiments of the present invention;

FIG. 4A illustrates an encoder-decoder architecture;

FIG. 4B illustrates data flows in an LSTM block, and

FIG. 5 is a flow graph of a method in accordance with at least some embodiments of the present invention.

EMBODIMENTS

An artificial neural network architecture is herein described, which is usable in obtaining a correlation coefficient descriptive of a level of correlation between distinct sequences of input data, which need not be of a same modality. For example, the input sequences may comprise data of different media formats or media types, such as a video sequence and a sentence of text. Recurrent neural networks are employed to characterize each input sequence before deriving the correlation coefficient.

FIG. 1 illustrates sequential inputs usable with at least some embodiments of the present invention. A first input sequence 102 is illustrated in the upper part of the figure and a second input sequence 103 is illustrated in the lower part of the figure. For example, first input sequence 102 may comprise a video clip comprising a plurality of still video frames. Second input sequence 103 may comprise, for example, a sentence comprising a sequence of words of a natural language, such as Chinese or French.

A video clip may be stored by storing, separately, each still video frame on a storage medium. Since storing each frame separately may require a great deal of storage capacity, video clips are often stored in encoded format wherein the still frames are not each separately stored but frames are stored with reference to each other. This may enable a large saving of storage capacity, since depending on the contents of the video, sequential frames often share a portion of their content, wherefore storing such shared content repeatedly is unnecessary. When a video clip is stored in encoded format, the individual still video frames of the clip may be generated from the encoded clip by performing a decoding operation.

Neural networks may be used to classify still images. Convolutional feedforward networks may be used to determine, for example, whether a specific still image depicts a certain class of object, for example, whether there is a pedestrian in a still image generated from a dashboard camera. Recurrent neural networks, RNN, on the other hand, may be used in processing sequences of data, such as sentences in natural language. For example, machine translation from one natural language to another may rely on RNNs. The quality of machine translations has improved markedly in recent years as RNN-based solutions have been taken into use.

Long short-term memory, LSTM, RNNs have been employed in translating events of a video clip to natural language format. LSTMs are RNN blocks which may comprise a memory cell and three gates. LSTMS may lack activation functions within the recurrent components inside an LSTM unit. For example, a collision of two planets in a video clip might be rendered, using an LSTM-based RNN, as “two spheres collide” in natural language. However, to date such systems have only achieved low rates of success, making them impractical. At least some embodiments of the present invention relate to a related, but different, task of obtaining a correlation between sequential inputs, for example a video clip and a sentence. The sentence may be in natural language. The inventors have realized that obtaining a correlation between two sequential inputs is more readily achievable than translating one sequential input into another, for example to another modality such as video to sentence.

By a modality it is herein meant a type of data. Examples of modalities include video, textual sentence, speech, handwritten text, stereo video, image sequence and traffic pattern. In some embodiments, modalities may include different video encoding methods, such as mpeg4, HEVC and VP9. Modalities may include colour video and black-and-white video. Modalities may comprise different media types, such as video, text, audio and moving images without audio.

Now, a brief introduction to canonical correlation analysis, CCA, is given. Given two views of data X∈

^(d) ¹ ^(×M) and Y∈

^(d) ² ^(×M), where M is the number of the samples, and d₁ and d₂ are the feature dimensions in the two views, respectively, CCA aims to project them into a unified feature space where they are maximally correlated. Denote the two projection matrices as W_(X) and W_(Y) respectively, and then the objective of CCA can be written as follows,

$\begin{matrix} {{\rho = {{\max_{W_{X},W_{Y}}{{corr}\left( {{W_{X}^{T}X},{W_{Y}^{T}Y}} \right)}} = {\max\limits_{W_{X},W_{Y}}\frac{W_{X}^{T}\Sigma_{XY}W_{Y}}{\sqrt{W_{X}^{T}\Sigma_{XX}W_{X}}\sqrt{W_{Y}^{T}\Sigma_{YY}W_{Y}}}}}},} & (1) \end{matrix}$

where Σ_(XX) and Σ_(YY) are the within-set covariance matrices, and Σ_(XY) (Σ_(XY)=Σ_(XY) ^(T)) is the between-set covariance matrix. Eqn. (1) equals to,

ρ=W _(X) ^(T)Σ_(XY) W _(Y) , s.t. W _(X) ^(T)Σ_(XX) W _(X) =W _(Y) ^(T)Σ_(YY) W _(Y)=1.  (2)

By introducing Lagrangian parameters, Eqn. (2) can be further written as

$\begin{matrix} {{{f\left( {W_{X},W_{Y},\lambda_{X},\lambda_{Y}} \right)} = {{W_{X}^{T}\Sigma_{XY}W_{Y}} - {\frac{\lambda_{X}}{2}\left( {{W_{X}^{T}\Sigma_{XX}W_{X}} - 1} \right)} - {\frac{\lambda_{Y}}{2}\left( {{W_{Y}^{T}\Sigma_{YY}W_{Y}} - 1} \right)}}},} & (3) \end{matrix}$

Then taking derivatives with regard to W_(X) and W_(Y) and forcing them to be zero, we obtain

Σ_(XY) W _(Y)=λ_(X)Σ_(XX) W _(X),  (4)

Σ_(YX) W _(X)=λ_(Y)Σ_(YY) W _(Y).  (5)

From Eqn. (4) and Eqn. (5), as well as the constraint of Eqn. (2), it can be easily obtained

λ_(X)=λ_(Y) =W _(X) ^(T)Σ_(XY) W _(Y).  (6)

Denote λ=λ_(X)=λ_(Y) and assume Σ_(XX) is invertible, by taking both Eqn. (5) and Eqn. (6) into account we have

Σ_(YX)Σ_(XY) ⁻¹Σ_(XY) W _(Y)=λ²Σ_(YY) W _(Y).  (7)

This is a generalized eigenvector problem. By solving Eqn. (7), one can obtain W_(Y), and by substituting W_(Y) in Eqn. (5), the corresponding W_(X) can also be obtained. With W_(X) and W_(Y), one can easily calculate the correlation between two samples in different views based on their projected representations.

CCA has been applied to a variety of tasks, such as multimedia annotation and search [38]. As CCA performs only linear projections, it cannot extract useful features in certain complex situations where relations between variables are nonlinear. A common approach is to use kernel methods [2][4], [19], [20] to project the data into a higher dimension first as those commonly used in support vector machine, SVM, and such kind of method is the aforementioned KCCA. As the design of KCCA follows the idea of CCA except for a kernel method, it can also be easily transformed into a similar eigenvector problem.

In spite of the nonlinearity KCCA achieves, it relies on a fixed kernel, and thus the representation that may be learned by KCCA is inherently limited. On the other hand, re-training KCCA with newly incoming training samples will result in a severe computational cost. The recently proposed DCCA [5] is directed to addressing this issue. Instead of transforming the correlation calculation into an eigenvector problem, DCCA models each modality of data with a specific deep network, and the projections can be learned by a gradient descend method. Yang et al. [40] propose a method that learns representations of temporal data for multimodal fusion. Their work, however, has a different target when compared to embodiments of the present invention. Their target is to fuse two modalities to accomplish a classification task. Certain embodiments of the present approach, in contrast, focus on cross-modality matching. The listed reference is able to learn a joint representation and may be used to perform cross-modality matching, but it is sub-optimal because it does not directly optimize the matching. In addition, it requires the sequences in two modalities have the same length. It is a strong restriction, and this is because its target is just to combine two modalities. For more details about CCA and its extended techniques, one may consult the survey in [2].

FIG. 2A illustrates an LSTM block. Recurrent neural networks, RNN, have been investigated for many decades [24][26], and in contrast to the well-known convolutional neural networks, CNNs, [27][30], they are able to store representations of past states. Such a mechanism is important for tasks involving sequential data. However, the networks utilizing recurrent strategy easily encounter gradient vanishing or gradient exploding issue when modeling long term dynamics due to the exponentially changing error signals flowing back in time. The long short-term memory, LSTM, [18] architecture addresses this issue by involving a memory cell and three gates. These enable learning when to forget past states and when to update the current state given new input information. The basic structure of LSTM is shown in FIG. 2A, and the corresponding formulations are as follows:

i _(t)=σ(W ^((i)) H),  (8)

o _(t)=σ(W ^((o)) H),  (9)

f _(t)=σ(W ^((f)) H),  (10)

m _(t)=ϕ(W ^((m)) H),  (11)

c _(t) =f _(t) ⊙c _(t-1) +i _(t) ⊙m _(t),  (12)

h _(t) =o _(t)⊙ϕ(c _(t)),  (13)

where i_(t), o_(t), f_(t) are input gate, output gate, forget gate, respectively, and they are designed for controlling the error flowing from different connections. The notation m_(t) can be also regarded as a special gate, which is used to modulate the input. H is the concatenation of the input of the current unit and the output of the previous hidden unit. The weights of the four gates are denoted as W^((i)), W^((o)), W^((f)) and W^((m)), respectively. The notation ⊙ stands for element-wise product, and the memory cell is the summation of two parts, the previous memory modulated by f_(t), and the current input modulated by i_(t). The notation h_(t) is the output of the current hidden unit. The two activation functions commonly used in LSTM are logistic sigmoid function and the hyperbolic tangent function, which are denoted as σ and ϕ, respectively.

Due to the powerfulness in sequence to sequence learning, LSTM has been widely used in speech recognition [31], machine translation [32], image captioning [33], and action recognition [34], for example.

LSTM has been widely applied to sequence to sequence learning problems in the past years. Generally, such tasks can be divided into three groups as mentioned in [33], that is, sequential inputs versus fixed outputs, fixed inputs versus sequential outputs, and sequential inputs versus sequential outputs. Embodiments of the present invention are directed to the third task, which has been demonstrated to be the most challenging one. As the input time steps usually differ from the output time steps, it is challenging to learn a direct mapping from input to output of each time step. To tackle this issue, recent work [35], [36], [36] utilizes an encoder-decoder strategy, see FIG. 4A. The encoder is used to generate a fixed length representation of one sequence, which can be unrolled later by the decoder into the other sequence of any length.

The encoder-decoder type solution can be applied to tasks such as speech recognition, machine translation, and others.

FIG. 2B illustrates an example system in accordance with at least some embodiments of the present invention. The top part is used to model one sequence, x, and the bottom left part is used to model the other sequence, y. The outputs of the two sequences interact through a correlation function 210. Correlation function 210 may be configured to generate a correlation coefficient as output, which is illustrated as a downward pointing arrow in FIG. 2B. Here, the inputs of the neural networks are the two sequences {x₁, x₂, . . . , x_(m)} and {y₁, y₂, . . . , y_(n)}, and the output is their correlation coefficient. The input sequences may be of different modalities. While LSTM blocks are illustrated in FIG. 2B, other kinds of RNN blocks may be usable in different embodiments of the present invention. The principle of the present invention is herein referred to as deep recurrent correlation neural network, DRCNN.

Generally, DRCNN learns a non-linear projection for each input sequence while preserving the internal dependencies within it. Let {x₁, x₂, . . . , x_(m)} be an input sequence in the first view, where x_(i)∈

^(d) ¹ is the feature vector of the i-th time step, and let {y₁, y₂, . . . , y_(n)} be the corresponding input sequence in the second view, where y_(j)∈

^(d) ² is the feature vector of the j-th time step. In other words, the input sequences need not be of the same length. As the weights of the LSTM units (θ₁, θ₁′, θ₂, θ₂′) are shared through time, the number of time steps in the first view (m) is not necessary equivalent to that in the second view (n). Assume that f₁ and f₂ are the functions to map the input to the output of each sequence, and then the outputs of the two sequences z₁ and z₂ can be denoted as:

z ₁ =f ₁(x ₁ ,x ₂ , . . . ,x _(m),θ₁,θ₁′),  (14)

z ₂ =f ₂(y ₁ ,y ₂ , . . . ,y _(n),θ₂,θ₂′).  (15)

As we need to calculate the correlation between two views of data, the dimensionalities of them must be rendered the same. As such, a linear transformation may be adopted on top of each LSTM sequence as follows:

p ₁=α₁ ^(T) z ₁,  (16)

p ₂=α₂ ^(T) z ₂.  (17)

Here p₁ and p₂ can be viewed as representations of the two sequences. Their dimensionalities are controlled by the parameters α₁ and α₂. Assume that p₁∈

^(d), p₂∈

^(d), and the total number of samples is M. Then, the two views of data used for correlation learning can be denoted as P₁*=

^(d×M) and P₂*=

^(d×M), respectively. As such, the objective of for training DRCNN can be written as:

ρ=max_(θ) ₁ _(,θ) ₁ _(′,θ) ₂ _(,θ) ₂ _(′)corr(P ₁ *, P ₂*),  (18)

that is, to maximize the correlation of the representations of the two views. To train the DRCNN, a general practice in network training may be followed, and a mini-batch stochastic gradient descent method may be adopted. The DRCNN framework may comprise two key components, that is, a sequence learning component and a correlation learning component, which may be optimized separately.

Concerning first optimizing the correlation learning component, assume that the training batch size is N, and P₁=(p₁ ⁽¹⁾, p₁ ⁽²⁾, . . . , p₁ ^((N)))∈

^(d×N) and P₂=(p₂ ⁽¹⁾, p₂ ⁽²⁾, . . . , p₂ ^((N)))∈

R^(d×N) are the data from the two views in a mini-batch. 1∈

^(N×N) is an all-1s matrix. Then, the center data matrices of P₁ and P₂ can be denoted as

${{\overset{\_}{P}}_{1} = {{P_{1} - {\frac{T}{N}P_{1}1\mspace{14mu}{and}\mspace{14mu}{\overset{\_}{P}}_{2}}} = {P_{2} - {\frac{1}{N}P_{2}1}}}},$

as respectively. Let

$\Sigma_{11} = {{\frac{1}{N - 1}{\overset{¯}{P}}_{1}{\overset{¯}{P}}_{1}^{\prime}\mspace{14mu}{and}\mspace{20mu}\Sigma_{22}} = {\frac{1}{N - 1}{\overset{¯}{P}}_{2}{\overset{¯}{P}}_{2}^{\prime}}}$

be the within-set covariance matrices of the two views, and let Σ₁₂=1/N−1P ₁ P ₂′ be the corresponding between-set covariance matrix. Define S=Σ₁₁ ^(−1/2)Σ₁₂Σ₂₂ ^(−1/2), and according to [5] Eqn. (16) is equivalent to:

ρ=∥S∥ _(tr) =tr(S′S)^(1/2).  (19)

Assume the singular value decomposition of S is S=UDV′, and then similar to the optimization of deep CCA (see appendix of [5]), one can compute the gradient of corr(P₁, P₂) with respect to P₁ as follows:

$\begin{matrix} {{\frac{\partial{{corr}\left( {P_{1},P_{2}} \right)}}{\partial P_{1}} = {\frac{1}{N - 1}\left( {{2{\nabla_{11}{\overset{\_}{P}}_{1}}} + {\nabla_{12}{\overset{\_}{P}}_{2}}} \right)}},{where}} & (20) \\ {{\nabla_{11}{= {{- \frac{1}{2}}\Sigma_{11}^{- \frac{1}{2}}{UDU}^{\prime}\Sigma_{11}^{- \frac{1}{2}}}}},{and}} & (21) \\ {\nabla_{12}{= {{- \frac{1}{2}}\Sigma_{11}^{- \frac{1}{2}}{UDU}^{\prime}{\Sigma_{22}^{- \frac{1}{2}}.}}}} & (22) \end{matrix}$

As mini-batch stochastic gradient descent method is adopted to train the network, the training error should be backward propagated to each sample, and the gradient of corr(P₁, P₂) w.r.t each p₁ ^((i)) can be computed as:

$\begin{matrix} {\frac{\partial{{corr}\left( {P_{1},P_{2}} \right)}}{\partial p_{1}^{(i)}} = {\frac{1}{N - 1}\left( {{2{\nabla_{11}\left( {\overset{¯}{P}}_{1} \right)_{({:{,i}})}}} + {\nabla_{12}\left( {\overset{¯}{P}}_{2} \right)_{({:{,i}})}}} \right)}} & (23) \end{matrix}$

where (P ₁)_((:,i)), (P ₂)_((:,i)) are the i-th column of P ₁ and P ₂, respectively.

Once

$\frac{\partial{{corr}\left( {P_{1},P_{2}} \right)}}{\partial p_{1}^{(i)}}$

is computed, we can compute the gradient of the objective function with respect to the input of each LSTM unit. Note that the approaches to optimize the objectives in the two views may be nearly the same. Therefore, we only show the optimization procedure in the first view for brevity.

Concerning then optimizing the sequence learning component, from Eqn. (8)-(14), we can see that the parameters needed to learn in sequence learning are exactly the weights of the four gates. Assuming that the output of the i-th sample at the last time step in the first view is h_(t) (i.e., h_(t)=z₁ ^((i))), and the corresponding input at the last time step is H, then we can visualize the data flow as in FIG. 4B. Therefore, the gradient of h_(t) with regard to H can be computed using the chain rule as follows (see FIG. 4B):

$\begin{matrix} {\frac{\partial h_{t}}{\partial H} = {{{\frac{\partial h_{t}}{\partial o_{t}}\frac{\partial o_{t}}{\partial H}} + {\frac{\partial h_{t}}{\partial c_{t}}\frac{\partial c_{t}}{\partial H}}} = {{\frac{\partial h_{t}}{\partial o_{t}}\frac{\partial o_{}}{\partial H}} + {\frac{\partial h_{t}}{\partial c_{t}}\left( {{\frac{\partial c_{t}}{\partial m_{t}}\frac{\partial m_{t}}{\partial H}} + {\frac{\partial c_{t}}{\partial i_{t}}\frac{\partial i_{t}}{\partial H}} + {\frac{\partial c_{t}}{\partial f_{t}}\frac{\partial f_{f}}{\partial H}}} \right)}}}} & (24) \end{matrix}$

From the formulations of LSTM (Eqn. (8)-(13)), one can compute the gradients of each parts in Eqn. (21) as follows (a reference about the gradient derivation can also be found in [39]):

$\begin{matrix} {{\frac{\partial h_{t}}{\partial o_{t}} = {\varnothing\left( c_{t} \right)}},{\frac{\partial h_{t}}{\partial c_{t}} = {o_{t} \odot {\varnothing^{\prime}\left( c_{t} \right)}}},} & (25) \\ {{\frac{\partial c_{t}}{\partial m_{t}} = i_{t}},{\frac{\partial c_{t}}{\partial i_{t}} = m_{t}},{\frac{\partial c_{t}}{\partial f} = c_{t - 1}},} & (26) \\ {{\frac{\partial o_{t}}{\partial H} = {{\sigma^{\prime}\left( {W^{(o)}H} \right)}W^{(o)}}},{\frac{\partial m_{t}}{\partial H} = {{\sigma^{\prime}\left( {W^{(m)}H} \right)}W^{(m)}}},} & (27) \\ {{\frac{\partial i_{t}}{\partial H} = {{\sigma^{\prime}\left( {W^{(i)}H} \right)}W^{(i)}}},{\frac{\partial f_{t}}{\partial H} = {{\sigma^{\prime}\left( {w^{(f)}H} \right)}{W^{(f)}.}}}} & (28) \end{matrix}$

It can be seen from FIG. 2B that the output of the sequence at the last time step is exactly the input of the correlation learning component. Therefore, one can easily compute the gradient of the final objective function with respect to H as follows:

$\begin{matrix} {{\frac{\partial{{corr}\left( {P_{1},P_{2}} \right)}}{\partial H} = {\frac{\partial{{corr}\left( {P_{1},P_{2}} \right)}}{\partial p_{1}^{(i)}}\frac{\partial p_{1}^{(i)}}{\partial z_{1}^{(i)}}\frac{\partial z_{1}^{(i)}}{\partial H}}},{{where}\mspace{14mu}\frac{\partial{{corr}\left( {P_{1},P_{2}} \right)}}{\partial p_{1}^{(i)}}}} & (29) \end{matrix}$

can be calculated as in Eqn. (23),

$\frac{\partial p_{1}^{(i)}}{\partial z_{1}^{(i)}}$

can be easily calculated as p₁ ^((i)) is a linear transformation of z₁ ^((i)) as shown in Eqn. (16), and

$\frac{\partial z_{1}^{(i)}}{\partial H}$

can be calculated as in Eqn. (24) (as h_(t)=z₁ ^((i))). As the parameters of the four gates are shared through time, one can easily calculate the gradients at previous time steps using the chain rule in exactly the same way.

Up to now, we have introduced how the DRCNN is trained, that is, how the involved parameters are optimized. Once training is completed, one may compute the correlation coefficient of two sequences by computing the inner product of p₁ and p₂ (see Eqn. (16) and Eqn. (17)).

DRCNN has been employed in test data to determine how well it functions. With a well-trained DRCNN, different application scenarios become available, such as:

Text-to-video matching, which can facilitate complex-query video search. That means, the query may be a descriptive sentence instead of one or two simple words. Videos may be ranked by computing the matching scores.

Video captioning, which attracts interests in both academia and industry. That means, we generate descriptive sentences for a given video. We can rank several candidate sentences by computing their matching scores with the video.

Video-to-video matching, which can be employed to video recommendation and classification. How to compute the distance of two videos is also a problem. As the DRCNN can generate fixed-dimension representation for a video, we can estimate the distance between videos based on the representations, and this distance well explores the semantic and temporal information of videos.

Here we have only talked about video, but the scheme can also be extended to other media documents. Indeed, input sequences may, in various applications, include aircraft systems outputs which may be correlated with aircraft control states, to, for example, warn pilots the aircraft has entered, or is entering, a stall or state of reduced controllability.

Now preliminary results for a first application scenario are presented, that is, for a complex-query video search. The inventors used the MSR-VTT dataset [37], which contains 200k video-sentence pairs. 8k pairs were randomly selected for experiments. 4k pairs were used for training DRCNN, and the rest were used in a video search experiment. In the video search experiment, 100 sentences were selected and used as queries to perform searches and then to check mean average precision, AP, performance. It was observed that the MAP measurement is 0.35. For comparison, the present approach was compared with CCA and DCCA methods. In these two methods, the video and textual representations were obtained by averaging the features of video frames and words. Clearly, these two methods cannot well explore the temporal information of sequences. The results were that the MAP measurements obtained by CCA and DCCA methods are 0.19 and 0.23, respectively. Thus, the DRCNN approach is able to achieve clearly better performance.

FIG. 3 illustrates an example apparatus capable of supporting at least some embodiments of the present invention. Illustrated is device 300, which may comprise, for example, server, desktop, laptop or tablet computer. Comprised in device 300 is processor 310, which may comprise, for example, a single- or multi-core processor wherein a single-core processor comprises one processing core and a multi-core processor comprises more than one processing core. Processor 310 may comprise more than one processor. A processing core may comprise, for example, a Cortex-A8 processing core manufactured by ARM Holdings or a Steamroller processing core produced by Advanced Micro Devices Corporation. Processor 310 may comprise at least one Qualcomm Snapdragon, Intel Atom and/or Intel Xeon processor. Processor 310 may comprise at least one application-specific integrated circuit, ASIC. Processor 310 may comprise at least one field-programmable gate array, FPGA. Processor 310 may be means for performing method steps in device 300. Processor 310 may be configured, at least in part by computer instructions, to perform actions.

Device 300 may comprise memory 320. Memory 320 may comprise random-access memory and/or permanent memory. Memory 320 may comprise at least one RAM chip. Memory 320 may comprise solid-state, magnetic, optical and/or holographic memory, for example. Memory 320 may be at least in part accessible to processor 310. Memory 320 may be at least in part comprised in processor 310. Memory 320 may be means for storing information. Memory 320 may comprise computer instructions that processor 310 is configured to execute. When computer instructions configured to cause processor 310 to perform certain actions are stored in memory 320, and device 300 overall is configured to run under the direction of processor 310 using computer instructions from memory 320, processor 310 and/or its at least one processing core may be considered to be configured to perform said certain actions. Memory 320 may be at least in part comprised in processor 310. Memory 320 may be at least in part external to device 300 but accessible to device 300.

Device 300 may comprise a transmitter 330. Device 300 may comprise a receiver 340. Transmitter 330 and receiver 340 may be configured to transmit and receive, respectively, information in accordance with at least one cellular or non-cellular standard. Transmitter 330 may comprise more than one transmitter. Receiver 340 may comprise more than one receiver. Transmitter 330 and/or receiver 340 may be configured to operate in accordance with global system for mobile communication, GSM, wideband code division multiple access, WCDMA, long term evolution, LTE, IS-95, wireless local area network, WLAN, Ethernet and/or worldwide interoperability for microwave access, WiMAX, standards, for example.

Device 300 may comprise a near-field communication, NFC, transceiver 350. NFC transceiver 350 may support at least one NFC technology, such as NFC, Bluetooth, Bluetooth Low Energy or similar technologies.

Device 300 may comprise user interface, UI, 360. UI 360 may comprise at least one of a display, a keyboard, a touchscreen, a vibrator arranged to signal to a user by causing device 300 to vibrate, a speaker and a microphone. A user may be able to operate device 300 via UI 360, for example to configure machine learning parameters.

Device 300 may comprise or be arranged to accept a user identity module 370. User identity module 370 may comprise, for example, a subscriber identity module, SIM, card installable in device 300. A user identity module 370 may comprise information identifying a subscription of a user of device 300. A user identity module 370 may comprise cryptographic information usable to verify the identity of a user of device 300 and/or to facilitate encryption of communicated information and billing of the user of device 300 for communication effected via device 300.

Processor 310 may be furnished with a transmitter arranged to output information from processor 310, via electrical leads internal to device 300, to other devices comprised in device 300. Such a transmitter may comprise a serial bus transmitter arranged to, for example, output information via at least one electrical lead to memory 320 for storage therein. Alternatively to a serial bus, the transmitter may comprise a parallel bus transmitter. Likewise processor 310 may comprise a receiver arranged to receive information in processor 310, via electrical leads internal to device 300, from other devices comprised in device 300. Such a receiver may comprise a serial bus receiver arranged to, for example, receive information via at least one electrical lead from receiver 340 for processing in processor 310. Alternatively to a serial bus, the receiver may comprise a parallel bus receiver.

Device 300 may comprise further devices not illustrated in FIG. 3. For example, where device 300 comprises a smartphone, it may comprise at least one digital camera. Some devices 300 may comprise a back-facing camera and a front-facing camera, wherein the back-facing camera may be intended for digital photography and the front-facing camera for video telephony. Device 300 may comprise a fingerprint sensor arranged to authenticate, at least in part, a user of device 300. In some embodiments, device 300 lacks at least one device described above. For example, some devices 300 may lack a NFC transceiver 350 and/or user identity module 370.

Processor 310, memory 320, transmitter 330, receiver 340, NFC transceiver 350, UI 360 and/or user identity module 370 may be interconnected by electrical leads internal to device 300 in a multitude of different ways. For example, each of the aforementioned devices may be separately connected to a master bus internal to device 300, to allow for the devices to exchange information. However, as the skilled person will appreciate, this is only one example and depending on the embodiment various ways of interconnecting at least two of the aforementioned devices may be selected without departing from the scope of the present invention.

FIG. 4A illustrates the encoder-decoder architecture discussed above. The upper network corresponds in this terminology to the “encoder” part and the lower network to the “decoder” part.

FIG. 4B illustrates data flows in one LSTM block. Output vector h_(t) is influenced by output gate vector o_(t) and cell state vector c_(t). Cell state vector c_(t) is in turn influenced by each of input gate vector i_(t), forget gate vector f_(t) and special gate m_(t).

FIG. 5 is a flow graph of a method in accordance with at least some embodiments of the present invention. The phases of the illustrated method may be performed in a device, such as a computer or server, configured to perform correlating in accordance with the present invention.

Phase 510 comprises obtaining, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality. Phase 520 comprises obtaining, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality. Finally, phase 530 comprises processing the first output and the second output to obtain a correlation of the first and second sequential inputs. The processing may comprise obtaining an inner product.

It is to be understood that the embodiments of the invention disclosed are not limited to the particular structures, process steps, or materials disclosed herein, but are extended to equivalents thereof as would be recognized by those ordinarily skilled in the relevant arts. It should also be understood that terminology employed herein is used for the purpose of describing particular embodiments only and is not intended to be limiting.

Reference throughout this specification to one embodiment or an embodiment means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment. Where reference is made to a numerical value using a term such as, for example, about or substantially, the exact numerical value is also disclosed.

As used herein, a plurality of items, structural elements, compositional elements, and/or materials may be presented in a common list for convenience. However, these lists should be construed as though each member of the list is individually identified as a separate and unique member. Thus, no individual member of such list should be construed as a de facto equivalent of any other member of the same list solely based on their presentation in a common group without indications to the contrary. In addition, various embodiments and example of the present invention may be referred to herein along with alternatives for the various components thereof. It is understood that such embodiments, examples, and alternatives are not to be construed as de facto equivalents of one another, but are to be considered as separate and autonomous representations of the present invention.

Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the preceding description, numerous specific details are provided, such as examples of lengths, widths, shapes, etc., to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, materials, etc. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the invention.

While the forgoing examples are illustrative of the principles of the present invention in one or more particular applications, it will be apparent to those of ordinary skill in the art that numerous modifications in form, usage and details of implementation can be made without the exercise of inventive faculty, and without departing from the principles and concepts of the invention. Accordingly, it is not intended that the invention be limited, except as by the claims set forth below.

The verbs “to comprise” and “to include” are used in this document as open limitations that neither exclude nor require the existence of also un-recited features. The features recited in depending claims are mutually freely combinable unless otherwise explicitly stated. Furthermore, it is to be understood that the use of “a” or “an”, that is, a singular form, throughout this document does not exclude a plurality.

INDUSTRIAL APPLICABILITY

At least some embodiments of the present invention find industrial application in processing sequential input data using artificial neural networks.

Acronyms List

CCA Canonical correlation analysis CNN Convolutional neural network DRCNN Deep recurrent correlation neural network

KCCA Kernel CCA

RNN Recurrent neural network

REFERENCE SIGNS LIST

102 First input sequence 103 Second input sequence 210 Correlation function 300-370 Structure of the apparatus of FIG. 3 510-530 Phases of the method of FIG. 5

CITATION LIST

-   [1] H. Hotelling, “Relations between two sets of variates,”     Biometrika, vol. 28, no. 3/4, pp. 321-377, 1936. -   [2] D. R. Hardoon, S. Szedmak, and J. Shawe-Taylor, “Canonical     correlation analysis: An overview with application to learning     methods,” Neural computation, vol. 16, no. 12, pp. 2639-2664, 2004. -   [3] S. Akaho, “A kernel method for canonical correlation analysis,”     arXiv preprint cs/0609071, 2006. -   [4] F. R. Bach and M. I. Jordan, “Kernel independent component     analysis,” Journal of Machine Learning Research, vol. 3, no. July,     pp. 1-48, 2002. -   [5] G. Andrew, R. Arora, J. A. Bilmes, and K. Livescu, “Deep     canonical correlation analysis.” in Proc. ICML, 2013, pp. 1247-1255. -   [6] F. Yan and K. Mikolajczyk, “Deep correlation for matching images     and text,” in Proc. CVPR, 2015, pp. 3441-3450. -   [7] Y. Verma and C. Jawahar, “Im2text and text2im: Associating     images and texts for cross-modal retrieval.” in Proc. BMVC, vol. 1,     2014, p. 2. -   [8] J. C. Pereira, E. Coviello, G. Doyle, N. Rasiwasia, G. R.     Lanckriet, R. Levy, and N. Vasconcelos, “On the role of correlation     and abstraction in cross-modal multimedia retrieval,” IEEE     Transactions on Pattern Analysis and Machine Intelligence, vol. 36,     no. 3, pp. 521-535, 2014. -   [9] Y. Gong, Q. Ke, M. Isard, and S. Lazebnik, “A multi-view     embedding space for modeling internet images, tags, and their     semantics,” International Journal of Computer Vision, vol. 106, no.     2, pp. 210-233, 2014. -   [10] K. Choukri and G. Chollet, “Adaptation of automatic speech     recognizers to new speakers using canonical correlation analysis     techniques,” Computer Speech & Language, vol. 1, no. 2, pp. 95-107,     1986. -   [11] R. Arora and K. Livescu, “Multi-view cca-based acoustic     features for phonetic recognition across speakers and domains,” in     Proc. ICASSP, 2013, pp. 7135-7139. -   [12] C. Chapdelaine, V. Gouaillier, M. Beaulieu, and L. Gagnon,     “Improving video captioning for deaf and hearing-impaired people     based on eye movement and attention overload,” in Electronic Imaging     2007, 2007, pp. 64 921K-64 921K. -   [13] M. Kahn, “Consumer video captioning system,” Mar. 5, 2002, U.S.     patent application Ser. No. 10/091,098. -   [14] M. E. Sargin, Y. Yemez, E. Erzin, and A. M. Tekalp,     “Audiovisual synchronization and fusion using canonical correlation     analysis,” IEEE Transactions on Multimedia, vol. 9, no. 7, pp.     1396-1403, 2007. -   [15] H. Bredin and G. Chollet, “Audio-visual speech synchrony     measure for talking-face identity verification,” in Proc. ICASSP,     vol. 2, 2007, pp. 11-233. -   [16] J. Yuan, Z.-J. Zha, Y.-T. Zheng, M. Wang, X. Zhou, and T.-S.     Chua, “Learning concept bundles for video search with complex     queries,” in Proc. ACM MM, 2011, pp. 453-462. -   [17] D. Lin, S. Fidler, C. Kong, and R. Urtasun, “Visual semantic     search: Retrieving videos via complex textual queries,” in Proc.     CVPR, 2014, pp. 2657-2664. -   [18] S. Hochreiter and J. Schmidhuber, “Long short-term memory,”     Neural computation, vol. 9, no. 8, pp. 1735-1780, 1997. -   [19] P. L. Lai and C. Fyfe, “Kernel and nonlinear canonical     correlation analysis,” International Journal of Neural Systems, vol.     10, no. 05, pp. 365-377, 2000. -   [20] K. Fukumizu, F. R. Bach, and A. Gretton, “Statistical     consistency of kernel canonical correlation analysis,” Journal of     Machine Learning Research, vol. 8, no. February, pp. 361-383, 2007. -   [21] J. V'ia, I. Santamar'ia, and J. P'erez, “A learning algorithm     for adaptive canonical correlation analysis of several data sets,”     Neural Networks, vol. 20, no. 1, pp. 139-152, 2007. -   [22] A. Sharma, A. Kumar, H. Daume, and D. W. Jacobs, “Generalized     multiview analysis: A discriminative latent space,” in Proc. CVPR,     2012, pp. 2160-2167. -   [23] Y. Yamanishi, J.-P. Vert, A. Nakaya, and M. Kanehisa,     “Extraction of correlated gene clusters from multiple genomic data     by generalized kernel canonical correlation analysis,”     Bioinformatics, vol. 19, no. suppl 1, pp. i323-i330, 2003. -   [24] F. J. Pineda, “Generalization of back-propagation to recurrent     neural networks,” Physical review letters, vol. 59, no. 19, p. 2229,     1987. -   [25] P. J. Werbos, “Generalization of backpropagation with     application to a recurrent gas market model,” Neural Networks, vol.     1, no. 4, pp. 339-356, 1988. -   [26] R. J. Williams and D. Zipser, “Gradient-based learning     algorithms for recurrent networks and their computational     complexity,” Backpropagation: Theory, architectures and     applications, pp. 433-486, 1995. -   [27] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet     classification with deep convolutional neural networks,” in Proc.     NIPS, 2012. -   [28] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D.     Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper     with convolutions,” in Proc. CVPR, 2015. -   [29] K. Simonyan and A. Zisserman, “Very deep convolutional networks     for large-scale image recognition,” arXiv preprint arXiv:1409.1556,     2014. -   [30] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning     for image recognition,” arXiv preprint arXiv:1512.03385, 2015. -   [31] A. Graves, A.-r. Mohamed, and G. Hinton, “Speech recognition     with deep recurrent neural networks,” in Proc. ICASSP, 2013, pp.     6645-6649. -   [32] I. Sutskever, O. Vinyals, and Q. V. Le, “Sequence to sequence     learning with neural networks,” in Advances in neural information     processing systems, 2014, pp. 3104-3112. -   [33] J. Donahue, L. Anne Hendricks, S. Guadarrama, M. Rohrbach, S.     Venugopalan, K. Saenko, and T. Darrell, “Long-term recurrent     convolutional networks for visual recognition and description,” in     Proc. CVPR, 2015, pp. 2625-2634. -   [34] J. Yue-Hei Ng, M. Hausknecht, S. Vijayanarasimhan, O.     Vinyals, R. Monga, and G. Toderici, “Beyond short snippets: Deep     networks for video classification,” in Proc. CVPR, 2015, pp.     469-4702. -   [35] W. Zaremba, I. Sutskever, and O. Vinyals, “Recurrent neural     network regularization,” arXiv preprint arXiv:1409.2329, 2014. -   [36] N. Srivastava, E. Mansimov, and R. Salakhutdinov, “Unsupervised     learning of video representations using lstms,” CoRR,     abs/1502.04681, vol. 2, 2015 -   [37] J. Xu, T. Mei, T. Yao, Y. Rui. “MSR-VTT: A Large Video     Description Dataset for Bridging Video and Language,” in Proc. CVPR     2016. -   [38] Nikhil Rasiwasi, Jose Costa Pereira, Emanuele Coviello, Gabriel     Doyle, Gert R. G. Lanckriet, Roger Levy, Nuno Vasconcelos, “A New     Approach to Cross-Modal Multimedia Retrieval,” in Proc. ACM MM,     2010. -   [39] Sepp Hochreiter and Jurgen Schmidhuber, “long short-term     memory,” Neural Computations, vol. 9, no. 8, pp. 1735-1780, 1997. -   [40] Yang et al., “Deep Multimodal Representation Learning from     Temporal Data,” ArXiv, https://arxiv.org/pdf/1704.03152.pdf 

1-21. (canceled)
 22. An apparatus comprising at least one processor, and at least one memory including computer program code, the at least one memory and the computer program code being configured to, with the at least one processor, cause the apparatus at least to perform: obtain, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality; obtain, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality, and process the first output and the second output to obtain a correlation of the first and second sequential inputs.
 23. The apparatus according to claim 22, wherein the first recurrent neural network and the second recurrent neural network each comprise plural long short term memory, LSTM, blocks.
 24. The apparatus according to claim 22, wherein the first recurrent neural network comprises a first number of long short term memory, LSTM, blocks and the second recurrent neural network comprises a second number of LSTM blocks, the first number and the second number being unequal.
 25. The apparatus according to claim 22, wherein the at least one memory and the computer program code are further configured to, with the at least one processor, cause the apparatus to process the first output and the second output by rendering the first output and the second output to have equal dimensions prior to obtaining an inner product to obtain the correlation.
 26. The apparatus according to claim 25, wherein the at least one memory and the computer program code are further configured to, with the at least one processor, cause the apparatus to render the outputs to have the equal dimensions by employing a linear transformation.
 27. The apparatus according to claim 22, wherein the first modality and the second modality are different from each other.
 28. The apparatus according to claim 22, wherein the first modality is selected from a list comprising: video, textual sentence, speech, handwritten text, stereo video, image sequence, aircraft control states and aircraft system outputs.
 29. The apparatus according to claim 22, wherein the second modality is selected from a list comprising: video, textual sentence, speech, handwritten text, stereo video, image sequence, aircraft control states and aircraft system outputs.
 30. The apparatus according to claim 22, wherein sequential input comprises an input comprising a sequence of input elements.
 31. A method, comprising: obtaining, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality; obtaining, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality, and processing the first output and the second output to obtain a correlation of the first and second sequential inputs.
 32. The method according to claim 31, wherein the first recurrent neural network and the second recurrent neural network each comprise plural long short term memory, LSTM, blocks.
 33. The method according to claim 31, wherein the first recurrent neural network comprises a first number of long short term memory, LSTM, blocs and the second recurrent neural network comprises a second number of LSTM blocks, the first number and the second number being unequal.
 34. The method according to claim 31, wherein the first output and the second output are processed by rendering the first output and the second output to have equal dimensions prior to obtaining an inner product to obtain the correlation.
 35. The method according to claim 34, wherein the outputs are rendered to have the equal dimensions by employing a linear transformation.
 36. The method according to claim 31, wherein the first modality and the second modality are different from each other.
 37. The method according to claim 31, wherein the first modality is selected from a list comprising: video, textual sentence, speech, handwritten text, stereo video, image sequence and traffic pattern.
 38. The method according to claim 31, wherein the second modality is selected from a list comprising: video, textual sentence, speech, handwritten text, stereo video, image sequence and traffic pattern.
 39. The method according to claim 31, wherein sequential input comprises an input comprising a sequence of input elements.
 40. A non-transitory computer readable medium comprising program instructions for causing an apparatus to perform at least the following: obtaining, from a first sequential input, a first output from a first recurrent neural network, the first sequential input being of a first modality; obtaining, from a second sequential input, a second output from a second recurrent neural network, the second sequential input being of a second modality, and processing the first output and the second output to obtain a correlation of the first and second sequential inputs. 